Make user turns visually distinct (heading + 👤 marker, opt-in color)#242
Open
huangruizhe wants to merge 2 commits into
Open
Make user turns visually distinct (heading + 👤 marker, opt-in color)#242huangruizhe wants to merge 2 commits into
huangruizhe wants to merge 2 commits into
Conversation
In long transcripts it's hard to tell user turns from agent turns while scrolling, even though user turns are the natural boundary between conversation rounds. Render each user turn as a level-3 heading with a 👤 marker. This makes them pop visually and populates the document outline, so readers can jump between rounds. Agent turns stay quiet (italic-bold) with a 🤖 marker so user turns remain the anchors. All plain Markdown — renders cleanly in every reader (GitHub, VS Code, Quick Look). Color is opt-in and off by default: set `[markdown] user_turn_color = "#2563eb"` (any CSS color) in config.toml to tint the user heading via an inline <span> for readers that render inline HTML (e.g. VS Code preview). Off by default because readers that don't support inline CSS (GitHub, Quick Look) can show the raw tag rather than hiding it — so it's never imposed. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ng contract Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
In long transcripts it's hard to tell user turns from agent turns while scrolling — both render as the same italic-bold header. Yet user turns are the natural boundary between conversation rounds, so they're what you actually scan for.
Change
Render each user turn as a level-3 heading with a 👤 marker:
Opt-in color (off by default)
Markdown has no color of its own, and inline CSS is unreliable — VS Code's preview renders
<span style="color:…">, but GitHub and macOS Quick Look strip/leak it. So color is opt-in via config, default off:When unset (default) the output is plain Markdown. When set, the user heading is wrapped in an inline-color
<span>. This keeps the default portable while letting people who live in an HTML-capable reader opt into color.Notes for downstream consumers
This changes the user/agent header format (
_**User**_→### 👤 User, and_**Agent**_→_**🤖 Agent**_). Anything that parses these headers to segment turns should match the new form (or both). Flagging explicitly since the.mdis also consumed by tooling/indexers.Tests
renderRoleHeadertests: user heading + 👤 marker, plain-by-default (no inline HTML), opt-in color span, agent stays quiet with 🤖.go build ./...,go test ./...,golangci-lint run ./...all clean.